package com.item.springsecurity.singleton;

import java.util.Date;

/**
 * _______                             __________
 * \      \   _______  __ ___________  \______   \__ __  ____
 * /   |   \_/ __ \  \/ // __ \_  __ \  |    |  _/  |  \/ ___\
 * /    |    \  ___/\   /\  ___/|  | \/  |    |   \  |  / /_/  >
 * \____|__  /\___  >\_/  \___  >__|     |______  /____/\___  /
 * \/     \/          \/                \/     /_____/
 *
 * @Auther: wangdong
 * @Description: TODO  <p>单例模式，服务于全局</p>
 * @Date: 2019/4/25 14:25
 * @Version 1.0
 */
public class AdminSingleton {

    private String name;

    private long createDate;


    private AdminSingleton(){

    }

    private static class newInstance{
      private static final AdminSingleton ADMINSINGLETON = new AdminSingleton();
    }

    public static AdminSingleton getAdminSingleton(){
        return newInstance.ADMINSINGLETON;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getCreateDate() {
        return createDate;
    }

    public void setCreateDate(long createDate) {
        this.createDate = createDate;
    }

    @Override
    public String toString() {
        return "AdminSingleton{" +
                "name='" + name + '\'' +
                ", createDate=" + createDate +
                '}';
    }
}

